Skip to content

Integrate Grin with the shared Slatepack UI - #1540

Draft
sneurlax wants to merge 2 commits into
feat/grin-e2efrom
feat/grin-ui
Draft

sneurlax wants to merge 2 commits into
feat/grin-e2efrom
feat/grin-ui

Conversation

@sneurlax

@sneurlax sneurlax commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Integrate Grin with the shared Slatepack UI from #1507: manual send and receive, invoices, finalize, repost and cancel, transaction details, payment proofs, recipient encryption, direct sends with transport warnings, Grin address handling, the theme version, and the locked amount on the wallet summary. Grin-specific behavior stays behind SlatepackInterface; Epic Cash and MWC keep their engines and policies.

With those screens in place, this PR adds Grin to the app's coin list, the README and the wallet creation matrix (moved here from #1538).

Commits

  1. style: dart format three views that predate the 3.13 SDK bump is formatter output only, for the same CI reason as in Add Grin wallet core integration #1538.
  2. feat: integrate Grin with the Slatepack UI is the change.

Since the last push

Rebased on the updated #1538 again, with no changes of its own since the previous push. That push brought these fixes from a review of my own, each with a test that fails without it:

  • Switching apps on a phone during a Stack Backup restore failed that wallet's restore, though the scan carries on when the app comes back. Pausing now keeps the restore waiting.
  • An HTTP send blamed the recipient ("The recipient's answer failed checks") for failures of the wallet's own. It now says so only for an answer grin_native refused (bad_answer).
  • The receive screen's QR is Grin's bare address, but "Advanced options" (mobile) and "Create new QR code" (desktop) still made grin: payment URIs. Both are hidden for Grin.
  • With Grin in the coin list, an exchange could be given a Grin wallet's address as the payout or refund address. Stack Wallet receives Grin by Slatepack only and runs no listener, so the exchange wallet pickers now say that instead of listing Grin wallets.
  • The slate records and the scan's resume height share one stored value, and a slate record written during a scan checkpoint could overwrite it, or the reverse. Changes to it now go one at a time, each from the stored value.

Not changed here

  • In Slatepack mode, Send all passes the spendable balance without a send-all selection, for Epic Cash, MWC and Grin alike.
  • Grin has no default block explorer. Like Epic Cash and MWC, it relies on Hide unsupported coins from block explorer settings #1518 to be left out of the block explorer settings, so Hide unsupported coins from block explorer settings #1518 should land before this PR.
  • Grin keeps a small record per slate in the wallet's Grin data (amounts, direction, broadcast status) and never prunes it. The records grow with the transaction history.
  • Creating an S1 and finalizing an S2 do not ask for the PIN, while paying an invoice and a direct send do. That is how Share the Epic Cash and MWC Slatepack UI #1507's shared Slatepack flow works for Epic Cash and MWC as well.
  • Cancel is not offered for a finalized send after the node refuses a repost. A node also refuses a repost of a transaction already in its pool, so the refusal does not show the send is gone, and cancelling one that later confirms would drop its change. Cancel is offered when the first broadcast failed.
  • Stack Duo's theme archives gain Grin's two coin icons, as they already carry Epic Cash, MWC, Xelis and Firo icons. Stack Duo still has no Grin wallet and does not build grin-ffi.

Dependency boundary

Only grin_native, at the #1538 pin. No bare grin dependency. Epic and MWC pins are staging's.

Verification

At this PR's head (6e91be2f1):

  • dart analyze: no errors. Files this stack changes have no new analyzer issues on the lines it changes, and the new files have none.
  • CI's format check on the PR's changed Dart files: clean.
  • The Grin wallet, page and widget tests: 782 pass.
  • The full flutter test suite: 1735 passed, 8 skipped, and one Firo cache reset test in firo_cache_reset_lifecycle_test.dart that times out in full runs on this machine and passes on its own, as in earlier review stacks.
  • The eight scripts/tests that CI runs, run as CI runs them: pass.
  • Each new test was checked against the code without its fix, and fails there.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.39071% with 331 lines in your changes missing coverage. Please review.
✅ Project coverage is 22.35%. Comparing base (805b16a) to head (6e91be2).

Files with missing lines Patch % Lines
lib/pages/slatepack/request_invoice_view.dart 59.50% 66 Missing ⚠️
...wallet_view/sub_widgets/wallet_options_button.dart 0.00% 27 Missing ⚠️
..._view/wallet_view/sub_widgets/desktop_receive.dart 40.90% 26 Missing ⚠️
lib/pages/slatepack/verify_payment_proof_view.dart 76.84% 22 Missing ⚠️
...t/wallet_mixin_interfaces/slatepack_interface.dart 62.06% 22 Missing ⚠️
lib/pages/receive_view/receive_view.dart 0.00% 21 Missing ⚠️
..._view/sub_widgets/wallet_balance_toggle_sheet.dart 0.00% 19 Missing ⚠️
.../transaction_views/tx_v2/slatepack_tx_details.dart 85.71% 17 Missing ⚠️
lib/wallets/wallet/impl/grin_wallet.dart 94.51% 17 Missing ⚠️
...settings/wallet_settings_wallet_settings_view.dart 0.00% 14 Missing ⚠️
... and 13 more
Additional details and impacted files
@@                Coverage Diff                @@
##           feat/grin-e2e    #1540      +/-   ##
=================================================
+ Coverage          21.57%   22.35%   +0.77%     
=================================================
  Files               1159     1167       +8     
  Lines             115925   117157    +1232     
=================================================
+ Hits               25016    26190    +1174     
- Misses             90909    90967      +58     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

These files were last changed before the SDK constraint moved to 3.13, so
CI's format check would fail on any later change to them. This commit is
the formatter's output only.
Expose Grin through the shared Slatepack flows, transaction details,
themes, and wallet screens while importing its API solely from
grin_native. With those screens in place, add Grin to the app's coin
list and the wallet creation matrix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant